/**custom**/

@cascader-prefix-cls: ~"@{css-prefix}cascader";
@caspanel-prefix-cls: ~"@{css-prefix}caspanel";

.@{cascader-prefix-cls} {
  .sh-select-header {
    min-height: 38px;
    line-height: 38px;
  }
  .header-ul {
    .header-inner {
      width: 150px;
      word-break: keep-all;
      overflow: hidden;
      text-overflow: ellipsis;
      white-space: nowrap;
    }
    .iconfont {
      color: #909399;
    }
  }
  .sh-select-body {
    width: auto;
    .inner {
      width: max-content;
      max-width: 150px;
    }
  }
  &-middle {
    font-size: @font-size-base;
    .sh-select-header {
      min-height: 28px;
    }
    .header-ul {
      li {
        line-height: 28px;
        height: 28px;
      }
    }
    .header-inner {
      line-height: 28px;
    }
    .@{select-header} {
      line-height: 28px;
    }
    .@{select-body} {
      li {
        line-height: 30px;
        padding-right: 0;
      }
    }
    .right-icon {
      right: 0;
    }
  }
  &-small {
    font-size: @font-size-small;
    .sh-select-header {
      min-height: 28px;
    }
    .header-ul {
      li {
        height: 28px;
        line-height: 28px;
      }
    }
    .header-inner {
      line-height: 28px;
    }
    .@{select-header} {
      line-height: 28px;
    }
    .@{select-body} {
      li {
        line-height: 30px;
        padding-right: 0;
      }
    }
    .right-icon {
      right: 0;
    }
  }
}
.@{caspanel-prefix-cls} {
  display: flex;
  border-left: 1px solid @border-color-base;
  ul {
    max-height: 200px;
    overflow-y: auto;
    height: min-content;
    min-width: 100px;
  }
}
.@{form-item-prefix-cls}-error{
  .@{cascader-prefix-cls}{
    .sh-select-header {
      .input-error;
      &-icon{
          color: @error-color;
      }
    }
  }
}

@select: ~"@{css-prefix}select";
@select-header: ~"@{css-prefix}select-header";
@select-body: ~"@{css-prefix}select-body";
@select-option: ~"@{css-prefix}option";

.@{select-header} {
  box-sizing: border-box;
  width: 100%;
  user-select: none;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  padding: 0 25px 0 10px;
  min-height: 40px;
  position: relative;
  transition: all @transition-time @ease-in-out;
  border: 1px solid @border-color-base;
  border-radius: @border-radius-small;
  background: @component-background;
  .header-ul {
    width:100%;
    li.singleSelect {
      width: 100%;
      white-space: nowrap;
      text-overflow: ellipsis;
      overflow: hidden;
      word-break: break-all;
    }
    li.tagLi {
      // height: 38px;
      // line-height: 38px;
      display: flex;
      flex-flow: row wrap;
      align-items: center;
    }
    .tag {
      display: inline-flex;
      line-height: 20px;
      background: rgba(096, 098, 102, .2);
      margin-right: 4px;
      margin: 2px;
    }
  }
  .iconfont {
    color: #909399;
  }
  &-focus {
    .active();
  }
  &:hover {
    border: 1px solid @input-hover-border-color;
  }
  &-disabled {
    cursor: @cursor-disabled;
    background: @background-color-base;
  }
  .header-input {
    height: 38px;
    line-height: 38px;
    font-size: @font-size-base;
    flex: 1;
    border: 0;
    width: 10px;
    outline: none;
  }
  .right-icon {
    height: 20px;
    line-height: 20px;
    display: inline-block;
    position: absolute;
    right: 10px;
    top: 50%;
    margin-top: -10px;
  }
}
.@{select-body} {
  width: inherit;
  margin: 6px 0;
  max-height: 216px;
  overflow-y: auto;
  position: absolute;
  box-shadow: @shadow-base;
  border-radius: @border-radius-small;
  background: @component-background;
  z-index: @zindex-modal;
  li {
    word-break: keep-all;
    line-height: 36px;
    transition: all @transition-time @ease-in-out;
    padding: 0 10px;
    &:hover {
      background: #ECF5FF;
    }
    .inner {
      flex: 1;
      overflow: hidden;
      text-overflow: ellipsis;
      white-space: nowrap;
    }
  }
  .select-loading {
    width: 100%;
    height: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
  }
  .@{select-option} {
    display: flex;
    &-active {
      color: @primary-color;
    }
    &-focus {
      background: #ECF5FF;
    }
    &-disabled {
      color: @btn-disable-color;
      cursor: @cursor-disabled;
      &:hover {
        background-color: @component-background;
      }
    }
  }
}

.@{select} {
  font-size: @font-size-large;
  vertical-align: middle;
  width: 200px;
  position: relative;
  display: inline-block;
  cursor: pointer;
  .no-data:hover {
    background: none;
  }
  .select-load{
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    span {
      margin-right: 6px;
    }
  }
  &-middle {
    font-size: @font-size-base;
    .@{select-header} {
      min-height: 30px;
      // li {
      //   height: 28px;
      //   line-height: 28px;
      // }
      .tag {
        line-height: 14px;
        margin-right: 4px;
      }
    }
    .header-input {
      line-height: 28px;
      height: 28px;
    }
    .@{select-body} {
      li {
        line-height: 30px;
        padding-right: 0;
      }
    }
    .right-icon {
      right: 0;
    }
  }
  &-small {
    font-size: @font-size-small;
    .@{select-header} {
      min-height: 30px;
      // li {
      //   height: 28px;
      //   line-height: 28px;
      // }
      .tag {
        line-height: 14px;
        margin-right: 4px;
      }
    }
    .header-input {
      line-height: 28px;
      height: 28px;
    }
    .@{select-body} {
      li {
        line-height: 30px;
        padding-right: 0;
      }
    }
    .right-icon {
      right: 0;
    }
  }
}